<template>

  <el-breadcrumb separator=">">
    <el-breadcrumb-item :to="{ path:'/admin/index'}" @click.native="clickIndex">首页</el-breadcrumb-item>
    <slot></slot>
  </el-breadcrumb>
</template>

<script>
import {mapMutations} from 'vuex';
export default {
  name: "MyBreadCrumb",
  methods:{
    ...mapMutations(['changeActivePath']),
    clickIndex(){
      window.localStorage.setItem("activePath",'/admin/index');
      this.changeActivePath('/admin/index');  //修改活跃的路由
    }
  }
}
</script>

<style scoped>

</style>
